#!/usr/bin/env bash
# usage: ./**.sh username

mkdir -p /home/$1/Windows/System /home/$1/Windows/Data

uuid_array=$(echo $(lsblk -f | grep -n "ntfs" | sed 's/[ ][ ]*/ /g' | cut -d ' ' -f 3))
num=$(echo ${uuid_array} | wc -w)
((num--))
uuid_array=(${uuid_array})

echo -e "UUID=${uuid_array[0]} /home/$1/Windows/System ntfs-3g defaults 0 0\n" >>/etc/fstab
echo -e "UUID=${uuid_array[$num]} /home/$1/Windows/Data ntfs-3g defaults 0 0\n" >>/etc/fstab
